package com.example.jobback.mapper;

import com.example.jobback.po.Company;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @InterfaceName: CompanyMapper
 * @Description: 公司mapper
 * @Author: lhb
 * @Date: 2025/5/17
 */

@Mapper
public interface CompanyMapper {
    int registerCompany(Company company);

    Company getCompanyById(Long companyId);

    int updateCompanyAvatar(Long companyId, String lastUrl);

    int updateCompany(@Param("company")Company company);

    int editCompanyCoreMessage(Long companyId, String companyName, LocalDateTime createDate);

    Long getCompanyNum();

    List<Company> getCompanyListByName(String cleanedContent);

    List<Company> getCompanyList();

    List<Company> searchPageCompanyList(Company company);

    List<String> getHotCities(int num);

    /**
     * @Description: 随机匹配企业
     * @param smartCompanyLimit 限制数
     * @param location
     * @return List<Company>
     * @Author lhb
     * @CreateTime 2025/7/25 11:19
     */
    List<Company> smartRecommendCompany(@Param("smartCompanyLimit") int smartCompanyLimit, @Param("location") String location);
}
